<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div id="all" >

  <div id="edit_div_body">
 		<form  action="${pageContext.request.contextPath}/user/allocation" method="post" id="edit_user_form"
	 		 class="pageForm required-validate" onsubmit="return iframeCallback(this,navTabAjaxDone);">
	 			<div layouth="56" class="pageFormContent" style="height: 150px; ">
					<p>
						<label>用户名：</label>
						<input type="hidden"  id="userId" name="userId" value="${user.id }"/>
						<input type="text" readonly="readonly" class="textInput" id="userName" name="userName" value="${user.name }"/>
					</p>
					<p>
						<label>所属角色：</label>
						<c:if test="${empty user.roleName}">
							<input type="text" readonly="readonly" class="textInput" id="userName" name="userName" value="没有分配角色"/>
						</c:if>
						<c:if test="${not empty user.roleName}">
							<input type="text" readonly="readonly" class="textInput" id="userName" name="userName" value="${user.roleName}"/>
						</c:if>
					</p>
					<div class="divider"></div>
					<table class="table" width="100%" layoutH="138">
			<thead>
				<tr>
					<th width="80"></th>
					<th width="80">角色名 </th>
					<th width="80">是否禁用</th>
					<th width="80">描述</th>
			</thead>
			<tbody>
				<c:forEach items="${roles}" var="bean" varStatus="status">
					<tr >
						<td height="20" >
			              <input type="radio" <c:if test="${bean.enable eq '0'}">disabled="disabled"</c:if> name="roleId" value="${bean.id}" />
			            </td>
						<td>${bean.name}</td>
						<td>
							<span class="STYLE1">
					             <c:if test="${bean.enable == 0}">
					           		 <font color="red">禁用</font>
					            </c:if>
					            <c:if test="${bean.enable ==1 }">
					            	<font color="blue">正常</font>
					            </c:if>
		            		</span>
						</td>
						<td>${bean.description}</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" >保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button class="close" type="button">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
  </div>
</div>